package com.ruoyi.project.cms.product.service;

import com.ruoyi.project.cms.product.domain.ProductClass;
import com.ruoyi.project.cms.product.mapper.ClassMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @CreateTime 2020/5/20 17:25
 */
@Service
public class ClassServiceImpl implements ClassService {
    @Autowired
    private ClassMapper classMapper;

    /**
     * 查询所有产品类别信息
     */
    @Override
    public List<ProductClass> findAll() {
        return classMapper.selectAll();
    }

    /**
     * 根据Id查询产品类别
     */
    @Override
    public ProductClass findById(int classId) {
        return classMapper.selectById(classId);
    }
}
